package tr.com.netgis.web;

public enum ErrorCode {

	INVALID_SESSION ("4001"),
	UNKNOWN("XXXX");
	
	private String code;
	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	private ErrorCode (String code) {
		this.code = code;
	}
	
	public static ErrorCode getErrorCode (String code){
		for (ErrorCode errorCode : ErrorCode.values()) {
			if (errorCode.code.equalsIgnoreCase(code)) {
				return errorCode;
			}
		}
		return UNKNOWN;
	}
}
